package com.party.core.model.member;

import com.party.core.model.BaseModel;

import java.io.Serializable;
import java.math.BigDecimal;

public class MemberPersonalCount extends BaseModel implements Serializable {

    private static final long serialVersionUID = 418453876437266136L;

    private String partnerMemberId;

    private String memberId;

    private Integer activityNum;

    private BigDecimal activityMoney;

    private Integer crowdfundNum;

    private BigDecimal crowdfundMoney;

    private Integer representNum;

    private BigDecimal supportMoney;

    public String getPartnerMemberId() {
        return partnerMemberId;
    }

    public void setPartnerMemberId(String partnerMemberId) {
        this.partnerMemberId = partnerMemberId == null ? null : partnerMemberId.trim();
    }

    public String getMemberId() {
        return memberId;
    }

    public void setMemberId(String memberId) {
        this.memberId = memberId == null ? null : memberId.trim();
    }

    public Integer getActivityNum() {
        return activityNum;
    }

    public void setActivityNum(Integer activityNum) {
        this.activityNum = activityNum;
    }

    public BigDecimal getActivityMoney() {
        return activityMoney;
    }

    public void setActivityMoney(BigDecimal activityMoney) {
        this.activityMoney = activityMoney;
    }

    public Integer getCrowdfundNum() {
        return crowdfundNum;
    }

    public void setCrowdfundNum(Integer crowdfundNum) {
        this.crowdfundNum = crowdfundNum;
    }

    public BigDecimal getCrowdfundMoney() {
        return crowdfundMoney;
    }

    public void setCrowdfundMoney(BigDecimal crowdfundMoney) {
        this.crowdfundMoney = crowdfundMoney;
    }

    public Integer getRepresentNum() {
        return representNum;
    }

    public void setRepresentNum(Integer representNum) {
        this.representNum = representNum;
    }

    public BigDecimal getSupportMoney() {
        return supportMoney;
    }

    public void setSupportMoney(BigDecimal supportMoney) {
        this.supportMoney = supportMoney;
    }

    @Override
    public boolean equals(Object o) {
        if (this == o) return true;
        if (!(o instanceof MemberPersonalCount)) return false;
        if (!super.equals(o)) return false;

        MemberPersonalCount that = (MemberPersonalCount) o;

        if (partnerMemberId != null ? !partnerMemberId.equals(that.partnerMemberId) : that.partnerMemberId != null)
            return false;
        if (memberId != null ? !memberId.equals(that.memberId) : that.memberId != null) return false;
        if (activityNum != null ? !activityNum.equals(that.activityNum) : that.activityNum != null) return false;
        if (activityMoney != null ? !activityMoney.equals(that.activityMoney) : that.activityMoney != null)
            return false;
        if (crowdfundNum != null ? !crowdfundNum.equals(that.crowdfundNum) : that.crowdfundNum != null) return false;
        if (crowdfundMoney != null ? !crowdfundMoney.equals(that.crowdfundMoney) : that.crowdfundMoney != null)
            return false;
        if (representNum != null ? !representNum.equals(that.representNum) : that.representNum != null) return false;
        return supportMoney != null ? supportMoney.equals(that.supportMoney) : that.supportMoney == null;
    }

    @Override
    public int hashCode() {
        int result = super.hashCode();
        result = 31 * result + (partnerMemberId != null ? partnerMemberId.hashCode() : 0);
        result = 31 * result + (memberId != null ? memberId.hashCode() : 0);
        result = 31 * result + (activityNum != null ? activityNum.hashCode() : 0);
        result = 31 * result + (activityMoney != null ? activityMoney.hashCode() : 0);
        result = 31 * result + (crowdfundNum != null ? crowdfundNum.hashCode() : 0);
        result = 31 * result + (crowdfundMoney != null ? crowdfundMoney.hashCode() : 0);
        result = 31 * result + (representNum != null ? representNum.hashCode() : 0);
        result = 31 * result + (supportMoney != null ? supportMoney.hashCode() : 0);
        return result;
    }

    @Override
    public String toString() {
        return "MemberPersonalCount{" +
                "partnerMemberId='" + partnerMemberId + '\'' +
                ", memberId='" + memberId + '\'' +
                ", activityNum=" + activityNum +
                ", activityMoney=" + activityMoney +
                ", crowdfundNum=" + crowdfundNum +
                ", crowdfundMoney=" + crowdfundMoney +
                ", representNum=" + representNum +
                ", supportMoney=" + supportMoney +
                '}';
    }
}